﻿@model HanGu.Entity.News
@{
    Layout = null;
    TempData["TitlePic"] = Model.TitlePic;//.Replace("_B.", "_S.");
    TempData["ContorlID"] = "Remark";
    TempData["Remark"] = Model.Remark;
    TempData["GropName"] = Model.GUID;
}
<div class="pageContent">
    <form method="post" action="admin/@ViewData["CurrentController"]/create" enctype="MULTIPART/FORM-DATA" class="pageForm required-validate"
    onsubmit="return iframeCallback(this, navTabAjaxDone);">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.GUID)
        <div class="CreateDiv">
            <div class="LeftDiv">
                <label>
                    标题图片：</label>
                @Html.HiddenFor(c => c.TitlePic)
                @Html.Partial("uploadify")
            </div>
            <div class="rightDiv">
                <p>
                    <label>
                        排序：</label>
                    @Html.TextBoxFor(model => model.Order, new { @class = "number", value = "0" })
                    @Html.ValidationMessageFor(model => model.Order)
                </p>
                <p>
                    <label>
                        标题：</label>
                    @Html.TextBoxFor(model => model.Title, new { @class = "required", style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.Title)
                </p>
                <p>
                    <label>
                        是否置顶:</label>
                    <input type="checkbox" id="IsIndex" name="IsIndex"  checked="@Model.IsIndex"/>
                    @Html.ValidationMessageFor(model => model.IsIndex)
                </p>
                <p>
                    <label>
                        点击数：</label>
                    @Html.TextBoxFor(model => model.Clicks, new { @class = "number" })
                    @Html.ValidationMessageFor(model => model.Clicks)
                </p>
                <p>
                    <label>
                        创建时间：</label>
                    @Html.TextBoxFor(model => model.CreateTime, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.CreateTime)
                </p>
                <p>
                    <label>
                        创建者：</label>
                    @Html.TextBoxFor(model => model.Creator, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.Creator)
                </p>
                <p>
                    <label>
                        修改时间：</label>
                    @Html.TextBoxFor(model => model.UpdateTime, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.UpdateTime)
                </p>
                <p>
                    <label>
                        修改者：</label>
                    @Html.TextBoxFor(model => model.Updater, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.Updater)
                </p>
            </div>
        </div>
        <p style="width: 100%; height: 80px;">
            <label>
                摘要:</label>
            @Html.TextAreaFor(model => model.Summary, new { style = "width:99%; height:80px;" })
        </p>
        @*        <div class="divider"/>        
*@
        <p style="width: 100%">
            <label style="width: 400px; margin-bottom: 10px;">
                <div style="width: 100px; float: left;">
                    内容：</div>
                <div style="width: 200px; float: left;">
                    @if (Model.ID > 0)
                    { 
                        <a class="button" target="ajaxTodo" href="admin/filemanage/DeleteByGroupName/@Model.GUID"  title="若修改【内容】，可先清空服务器的相关文件，确定清空吗？">
                            <span>清空服务器资源</span></a>
                    }
                </div>
            </label>
            @Html.Partial("Editor", new HanGu.Entity.EditorDTO() { CrontrollID = "Remark", Value = Model.Remark })
            @Html.ValidationMessageFor(model => model.Remark)
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
